package com.unknown.wiki.base;

import android.arch.lifecycle.MutableLiveData;
import android.arch.lifecycle.ViewModel;

public class BaseViewModel extends ViewModel {

    protected <T> void commonOnSuccessListener(MutableLiveData<T> mutableLiveData, T data) {
        mutableLiveData.setValue(data);
    }

    protected <T> void commonOnFailureListener(MutableLiveData<T> mutableLiveData, Throwable throwable) {
        mutableLiveData.setValue(null);
    }
}
